/*

 *  
 */

package com.ruifu.common.feign.factory;

import com.ruifu.common.feign.RemoteDocService;
import com.ruifu.common.feign.fallback.RemoteDocServiceFallbackImpl;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;


/**
 * @author lcq
 * @date 2020/5/14
 */
@Component
public class RemoteDocServiceFallbackFactory implements FallbackFactory<RemoteDocService> {

	@Override
	public RemoteDocService create(Throwable throwable) {
		RemoteDocServiceFallbackImpl remoteDocServiceFallback = new RemoteDocServiceFallbackImpl();
		remoteDocServiceFallback.setCause(throwable);
		return remoteDocServiceFallback;
	}
}
